/* Copyright Rex All rights reserved. */
enyo.kind({
	name: "com.RexToy.volmView",
	kind: com.RexToy.abstractCvtView,
	components: [
		{kind: "BasicScroller", components: [
			{kind: "RowGroup", components: [
				{name: "m3", richContent: false, kind: "Input", onblur:"blur", components: [
							{className: "hint", content: $L("Cubic Meter")}
						]},
				{name: "l", richContent: false, kind: "Input", onblur:"blur", components: [
							{className: "hint", content: $L("Liter")}
						]},
				{name: "oz", richContent: false, kind: "Input", onblur:"blur", components: [
							{className: "hint", content: $L("Ounce")}
						]},
				{name: "fgal", richContent: false, kind: "Input", onblur:"blur", components: [
							{className: "hint", content: $L("(Fl)Gallon")}
						]},
				{name: "fqt", richContent: false, kind: "Input", onblur:"blur", components: [
							{className: "hint", content: $L("(Fl)Quart")}
						]},
				{name: "fpt", richContent: false, kind: "Input", onblur:"blur", components: [
							{className: "hint", content: $L("(Fl)Pint")}
						]},
				{name: "dqt", richContent: false, kind: "Input", onblur:"blur", components: [
							{className: "hint", content: $L("(Dry)Quart")}
						]},
				{name: "dpt", richContent: false, kind: "Input", onblur:"blur", components: [
							{className: "hint", content: $L("(Dry)Pint")}
						]}
			]}
		]}
      ],  
	  
	
	fomular: {
		"m3->m3": "m3",
		
		"m3->l": "m3*1000",
		"l->m3": "l/1000",
		"m3->oz": "m3*33814.0227",
		"oz->m3": "oz/33814.0227",
		"m3->fgal": "m3*264.1720524",
		"fgal->m3": "fgal/264.1720524",
		"m3->fqt": "m3*1056.6882094",
		"fqt->m3": "fqt/1056.6882094",
		"m3->fpt": "m3*2113.3764189",
		"fpt->m3": "fpt/2113.3764189",
		
		"m3->dqt": "m3*908.0829843",
		"dqt->m3": "fqt/908.0829843",
		"m3->dpt": "m3*1816.1659685",
		"dpt->m3": "fpt/1816.1659685"
	},
	
	units: ["m3","l","oz","fgal","fqt","fpt","dqt","dpt"],
	baseUnit: "m3",
	
	blur: function(sender)
	{
		if(this.isNumber(sender))
		{
			this.calc(sender.name, this.getNumber(sender));
		}
	}
});